import Field from '@model/entity/Field'
import i18n from '@src/locales'
export enum ReviewTypeValueEnum {
  // 自动回访
  Auto = 2,
  // 手动回访
  Manual = 1,
}

export enum ReviewValueEnum {
  // 全部
  All = 2,
  // 已回访
  Reviewed = 1,
  // 未回访
  UnReview = 0,
  // 未回访
  FollowUp = 3,
  // 指派给我
  AssignToMe = 5,
}

export enum EvaluateValueEnum {
  // 全部
  All = 2,
  // 已评价
  Evaluated = 1,
  // 未评价
  UnEvaluate = 0
}

// 回访工单导出字段
export const TaskExportGroupTextEnum:any = {
  Balance: i18n.t('task.taskTypes.review.balanceInfo'),
  Card: i18n.t('task.record.taskCard'),
  System: i18n.t('task.systemInfo'),
  Task: i18n.t('task.taskInfo'),
  TaskReceipt: i18n.t('task.taskTypes.review.finishReceiptInfo'),
  Evaluate: i18n.t('task.taskTypes.review.evaluateInfo')
}

export enum TaskExportGroupValueEnum {
  Balance = 'expenseChecked',
  Card = 'annexChecked',
  System = 'systemChecked',
  Task = 'taskChecked',
  TaskReceipt = 'receiptChecked',
  Evaluate = 'evaluateChecked'
}

export enum EvaluateExportFields {
  // 回访状态
  ReviewState = 'reviewState',
  // 满意度
  Degree = 'degree',
  // 回访备注
  Suggestion = 'suggestion',
  // 回访人
  ReviewUser = 'reviewUser',
  // 回访时间
  ReviewTime = 'reviewTime',
  // 服务态度
  StarEvaluate1 = 'starEvaluate1',
  // 服务效率
  StarEvaluate2 = 'starEvaluate2',
  // 服务质量
  StarEvaluate3 = 'starEvaluate3',
  // 服务标签
  TagEvaluates = 'tagEvaluates',
}

export enum AutoEvaluateExportFields {
  // 评价时间
  EvaluationTime = 'evaluationTime',
  // 评价状态
  EvaState = 'evaState',
  // 满意度
  EvaDegree = 'evaDegree',
  // 客户评价
  EvaContent = 'evaContent',
}

export const TaskFieldDisplayNameMappingEnum:any =  {
  ReviewState: i18n.t('task.list.displayName.reviewState'),
  Degree: i18n.t('common.base.degree'),
  Suggestion: i18n.t('task.detail.components.evaluateSuggestion'),
  ReviewUser: i18n.t('task.detail.components.reviewUser'),
  ReviewTime: i18n.t('task.detail.components.reviewTime'),  
  EvaluationTime: i18n.t('task.detail.components.evaluateTime'),
  EvaState: i18n.t('task.list.displayName.evaluateState'),
  EvaDegree: i18n.t('common.base.degree'),
  EvaContent: i18n.t('task.customerEvaluation'),
  StarEvaluate1: i18n.t('task.detail.components.serviceAttitude'),
  StarEvaluate2: i18n.t('task.list.displayName.serviceEfficiency'),
  StarEvaluate3: i18n.t('task.list.displayName.serviceQuality'),
  TagEvaluates: i18n.t('task.detail.components.serviceTag'),
}

export const TaskExportReviewFields: Field[] = [
  // 回访状态
  {
    displayName: TaskFieldDisplayNameMappingEnum.ReviewState,
    fieldName: EvaluateExportFields.ReviewState
  },
  // 满意度
  {
    displayName: TaskFieldDisplayNameMappingEnum.Degree,
    fieldName: EvaluateExportFields.Degree
  },
  // 回访备注
  {
    displayName: TaskFieldDisplayNameMappingEnum.Suggestion,
    fieldName: EvaluateExportFields.Suggestion
  },
  // 回访人
  {
    displayName: TaskFieldDisplayNameMappingEnum.ReviewUser,
    fieldName: EvaluateExportFields.ReviewUser
  },
  // 回访时间
  {
    displayName: TaskFieldDisplayNameMappingEnum.ReviewTime,
    fieldName: EvaluateExportFields.ReviewTime
  },
  // 评价时间
  {
    displayName: TaskFieldDisplayNameMappingEnum.EvaluationTime,
    fieldName: AutoEvaluateExportFields.EvaluationTime
  },
  // 评价状态
  {
    displayName: TaskFieldDisplayNameMappingEnum.EvaState,
    fieldName: AutoEvaluateExportFields.EvaState
  },
  // 满意度
  {
    displayName: TaskFieldDisplayNameMappingEnum.EvaDegree,
    fieldName: AutoEvaluateExportFields.EvaDegree
  },
  // 客户评价
  {
    displayName: TaskFieldDisplayNameMappingEnum.EvaContent,
    fieldName: AutoEvaluateExportFields.EvaContent
  },
]

export const TaskExportEvaluateFields: Field[] = [
  // // 服务态度
  // {
  //   displayName: TaskFieldDisplayNameMappingEnum.StarEvaluate1,
  //   fieldName: EvaluateExportFields.StarEvaluate1
  // },
  // // 服务效率
  // {
  //   displayName: TaskFieldDisplayNameMappingEnum.StarEvaluate2,
  //   fieldName: EvaluateExportFields.StarEvaluate2
  // },
  // // 服务质量
  // {
  //   displayName: TaskFieldDisplayNameMappingEnum.StarEvaluate3,
  //   fieldName: EvaluateExportFields.StarEvaluate3
  // },
  // 服务标签
  {
    displayName: TaskFieldDisplayNameMappingEnum.TagEvaluates,
    fieldName: EvaluateExportFields.TagEvaluates
  }
]

export interface TaskType {
  name: string,
  id: string,
  [propName: string]: any;
}
